package br.fbv.compreja.activity.base;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;

import android.graphics.drawable.Drawable;

public class Util {
	public static Drawable loadImageFromWebOperations(String url) {
		InputStream is;
		Drawable drawable = null;
		try {
			is = (InputStream) new URL(url).getContent();
			drawable = Drawable.createFromStream(is, "src name");
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return drawable;
	}
}
